<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Geo3DML-CPP: g3dxml::XMLReaderHelper Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Geo3DML-CPP
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceg3dxml.html">g3dxml</a></li><li class="navelem"><a class="el" href="classg3dxml_1_1_x_m_l_reader_helper.html">XMLReaderHelper</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classg3dxml_1_1_x_m_l_reader_helper-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">g3dxml::XMLReaderHelper Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_x_m_l_reader_helper_8h_source.html">XMLReaderHelper.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a12b331ce86ae1ea9aa733a1411df6dc7" id="r_a12b331ce86ae1ea9aa733a1411df6dc7"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a12b331ce86ae1ea9aa733a1411df6dc7">DectectFileEncoding</a> (const std::string &amp;filePath)</td></tr>
<tr class="memdesc:a12b331ce86ae1ea9aa733a1411df6dc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Detect file's encoding.  <br /></td></tr>
<tr class="separator:a12b331ce86ae1ea9aa733a1411df6dc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a289f21fa1b8855d82dd439f13cf855fe" id="r_a289f21fa1b8855d82dd439f13cf855fe"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a289f21fa1b8855d82dd439f13cf855fe">IsUTF8</a> (const std::string &amp;encodingName)</td></tr>
<tr class="separator:a289f21fa1b8855d82dd439f13cf855fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a199b6170ff3d8ea2be14a35e249362e3" id="r_a199b6170ff3d8ea2be14a35e249362e3"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a199b6170ff3d8ea2be14a35e249362e3">FormatErrorMessageAboutEncoding</a> (const std::string &amp;encodingName, const std::string &amp;filePath)</td></tr>
<tr class="separator:a199b6170ff3d8ea2be14a35e249362e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7a93ee9408141ed6ffd5256c9c80f13" id="r_ad7a93ee9408141ed6ffd5256c9c80f13"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad7a93ee9408141ed6ffd5256c9c80f13">IsRelativePath</a> (const std::string &amp;path)</td></tr>
<tr class="memdesc:ad7a93ee9408141ed6ffd5256c9c80f13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether a path is relative.  <br /></td></tr>
<tr class="separator:ad7a93ee9408141ed6ffd5256c9c80f13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd539c3efaa1f8943ae039b1d1af3db1" id="r_afd539c3efaa1f8943ae039b1d1af3db1"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#afd539c3efaa1f8943ae039b1d1af3db1">TextNode</a> (xmlTextReaderPtr reader, const std::string &amp;element, std::string &amp;str)</td></tr>
<tr class="separator:afd539c3efaa1f8943ae039b1d1af3db1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad320cbbc358eabd1721e01ee288b1f4f" id="r_ad320cbbc358eabd1721e01ee288b1f4f"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad320cbbc358eabd1721e01ee288b1f4f">AttributeGMLID</a> (xmlTextReaderPtr reader)</td></tr>
<tr class="memdesc:ad320cbbc358eabd1721e01ee288b1f4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取XML标签的gml:id属性值。  <br /></td></tr>
<tr class="separator:ad320cbbc358eabd1721e01ee288b1f4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af85057b5b310cfc798e8e2fce4d0e59c" id="r_af85057b5b310cfc798e8e2fce4d0e59c"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af85057b5b310cfc798e8e2fce4d0e59c">Attribute</a> (xmlTextReaderPtr reader, const std::string &amp;attribute)</td></tr>
<tr class="memdesc:af85057b5b310cfc798e8e2fce4d0e59c"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取XML标签的某属性值。  <br /></td></tr>
<tr class="separator:af85057b5b310cfc798e8e2fce4d0e59c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace2e3cd561f9ae0ea5b0e5a9dc569c7c" id="r_ace2e3cd561f9ae0ea5b0e5a9dc569c7c"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ace2e3cd561f9ae0ea5b0e5a9dc569c7c">AttributeIdInHref</a> (xmlTextReaderPtr reader)</td></tr>
<tr class="memdesc:ace2e3cd561f9ae0ea5b0e5a9dc569c7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">从XML标签的 xlink:href 属性中提取ID值。  <br /></td></tr>
<tr class="separator:ace2e3cd561f9ae0ea5b0e5a9dc569c7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a686e04fd2babd4e061012381c221b749" id="r_a686e04fd2babd4e061012381c221b749"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a686e04fd2babd4e061012381c221b749">FormatErrorMessageWithPosition</a> (xmlTextReaderPtr reader, const std::string &amp;message)</td></tr>
<tr class="separator:a686e04fd2babd4e061012381c221b749"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="af85057b5b310cfc798e8e2fce4d0e59c" name="af85057b5b310cfc798e8e2fce4d0e59c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af85057b5b310cfc798e8e2fce4d0e59c">&#9670;&#160;</a></span>Attribute()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static std::string g3dxml::XMLReaderHelper::Attribute </td>
          <td>(</td>
          <td class="paramtype">xmlTextReaderPtr</td>          <td class="paramname"><span class="paramname"><em>reader</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>attribute</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>读取XML标签的某属性值。 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">reader</td><td>XML文件读取工具。 </td></tr>
    <tr><td class="paramname">attribute</td><td>XML标签的属性名字。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>标签中的属性值。 </dd></dl>

</div>
</div>
<a id="ad320cbbc358eabd1721e01ee288b1f4f" name="ad320cbbc358eabd1721e01ee288b1f4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad320cbbc358eabd1721e01ee288b1f4f">&#9670;&#160;</a></span>AttributeGMLID()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static std::string g3dxml::XMLReaderHelper::AttributeGMLID </td>
          <td>(</td>
          <td class="paramtype">xmlTextReaderPtr</td>          <td class="paramname"><span class="paramname"><em>reader</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>读取XML标签的gml:id属性值。 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">reader</td><td>XML文件读取工具。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>标签中的gml:id属性值。 </dd></dl>

</div>
</div>
<a id="ace2e3cd561f9ae0ea5b0e5a9dc569c7c" name="ace2e3cd561f9ae0ea5b0e5a9dc569c7c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ace2e3cd561f9ae0ea5b0e5a9dc569c7c">&#9670;&#160;</a></span>AttributeIdInHref()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static std::string g3dxml::XMLReaderHelper::AttributeIdInHref </td>
          <td>(</td>
          <td class="paramtype">xmlTextReaderPtr</td>          <td class="paramname"><span class="paramname"><em>reader</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>从XML标签的 xlink:href 属性中提取ID值。 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">reader</td><td>XML文件读取工具。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ID属性值。 </dd></dl>

</div>
</div>
<a id="a12b331ce86ae1ea9aa733a1411df6dc7" name="a12b331ce86ae1ea9aa733a1411df6dc7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a12b331ce86ae1ea9aa733a1411df6dc7">&#9670;&#160;</a></span>DectectFileEncoding()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static std::string g3dxml::XMLReaderHelper::DectectFileEncoding </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>filePath</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Detect file's encoding. </p>

</div>
</div>
<a id="a199b6170ff3d8ea2be14a35e249362e3" name="a199b6170ff3d8ea2be14a35e249362e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a199b6170ff3d8ea2be14a35e249362e3">&#9670;&#160;</a></span>FormatErrorMessageAboutEncoding()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static std::string g3dxml::XMLReaderHelper::FormatErrorMessageAboutEncoding </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>encodingName</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>filePath</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a686e04fd2babd4e061012381c221b749" name="a686e04fd2babd4e061012381c221b749"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a686e04fd2babd4e061012381c221b749">&#9670;&#160;</a></span>FormatErrorMessageWithPosition()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static std::string g3dxml::XMLReaderHelper::FormatErrorMessageWithPosition </td>
          <td>(</td>
          <td class="paramtype">xmlTextReaderPtr</td>          <td class="paramname"><span class="paramname"><em>reader</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>message</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="ad7a93ee9408141ed6ffd5256c9c80f13" name="ad7a93ee9408141ed6ffd5256c9c80f13"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad7a93ee9408141ed6ffd5256c9c80f13">&#9670;&#160;</a></span>IsRelativePath()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool g3dxml::XMLReaderHelper::IsRelativePath </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>path</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Check whether a path is relative. </p>

</div>
</div>
<a id="a289f21fa1b8855d82dd439f13cf855fe" name="a289f21fa1b8855d82dd439f13cf855fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a289f21fa1b8855d82dd439f13cf855fe">&#9670;&#160;</a></span>IsUTF8()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool g3dxml::XMLReaderHelper::IsUTF8 </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>encodingName</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="afd539c3efaa1f8943ae039b1d1af3db1" name="afd539c3efaa1f8943ae039b1d1af3db1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd539c3efaa1f8943ae039b1d1af3db1">&#9670;&#160;</a></span>TextNode()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool g3dxml::XMLReaderHelper::TextNode </td>
          <td>(</td>
          <td class="paramtype">xmlTextReaderPtr</td>          <td class="paramname"><span class="paramname"><em>reader</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>element</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>str</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get an element's text value. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">reader</td><td>the XML reader. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">element</td><td>name of the element to be parsed. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">str</td><td>Output the text value of the element if no error happended, otherwise it will store the error message. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Return true if parsing succeeded without any error, otherwise false. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/g3dxml/<a class="el" href="_x_m_l_reader_helper_8h_source.html">XMLReaderHelper.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
